<template>
  <view class="body">
    <view class="header">
      <image :src="ossImg('integral/headerImg.png')"></image>
    </view>
    <view class="bg">
      <image :src="ossImg('integral/bgImg.png')"></image>
    </view>
    <view class="concent">
      <view class="cart">
        <view class="text1">
          <image :src="ossImg('integral/text1.png')"></image>
        </view>

        <view class="text2">
          <image :src="ossImg('integral/text2.png')"></image>
        </view>
        <view class="text3">
          <image :src="ossImg('integral/text3.png')"></image>
        </view>
        <view class="text4">
          <image :src="ossImg('integral/text4.png')"></image>
        </view>
        <view class="text5">
          <image :src="ossImg('integral/text5.png')"></image>
        </view>
        <view class="text6">
          <image :src="ossImg('integral/text6.png')"></image>
        </view>
      </view>
    </view>
  </view>

  
</template>

<script setup>
import { ossImg } from "@/utils/utils";
import { onShow, onUnload, onHide } from "@dcloudio/uni-app";
import privacyPopup from "@/components/privacy-popup";

let enterTime = "";
let outTime = "";
let stayTime = "";

onShow(() => {
  // 用户进入时间
  enterTime = new Date();
  getApp().accessLogAdd();
});

onHide(() => {
  // 用户退出时间
  outTime = new Date();
  //停留时间(毫秒)
  stayTime = (outTime.getTime() - enterTime.getTime()) / 1000;

  getApp().emdlz(
    "track",
    "event",
    "pointspage",
    "view",
    "biscuit_rule_page",
    stayTime
  );
});

onUnload(() => {
  // 用户退出时间
  outTime = new Date();
  //停留时间(毫秒)
  stayTime = (outTime.getTime() - enterTime.getTime()) / 1000;
  getApp().emdlz(
    "track",
    "event",
    "pointspage",
    "view",
    "biscuit_rule_page",
    stayTime
  );
});
</script>

<style lang="less" scoped>
.body {
  position: relative;

  .header {
    width: 100%;
    height: 298px;
  }

  .bg {
    width: 100%;
    height: 1909.5px;
  }

  .concent {
    position: absolute;
    top: 238px;
    width: 100%;
    z-index: 99;

    .cart {
      width: 351px;
      height: 1940px;
      background-color: #2643ab;
      margin: 0 auto;
      border-radius: 16px;
      box-shadow: 0px -19px 92px 25px #0c0731;
      text-align: center;

      > view {
        margin: 0 auto;
      }

      .text1 {
        width: 340px;
        height: 144px;
        padding-top: 27px;
      }

      .text2 {
        width: 340px;
        height: 260px;
        margin-top: 25.5px;
      }

      .text3 {
        width: 340px;
        height: 564px;
        margin-top: 26px;
      }

      .text4 {
        width: 340px;
        height: 371px;
        margin-top: 16px;
      }

      .text5 {
        width: 340px;
        height: 166.5px;
        margin-top: 24px;
      }

      .text6 {
        width: 340px;
        height: 272px;
        margin-top: 24px;
      }
    }
  }
}

image {
  width: 100%;
  height: 100%;
}
</style>